//
//  ProgramaCollectionViewCell.m
//  UI14_homework(礼物说发现->攻略页面)
//
//  Created by Hanlingyu on 16/8/2.
//  Copyright © 2016年 ltq. All rights reserved.
//

#import "ProgramaCollectionViewCell.h"

@implementation ProgramaCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    
    self = [super initWithFrame:frame];
    if (self) {
        
        [self createView];
    }
    return self;
}

- (void)createView {
    
    _imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.frame) / 2, CGRectGetHeight(self.frame))];
    _imageView.image = [UIImage imageNamed:@"2.jpg"];
    [self.contentView addSubview:_imageView];
    
    _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetWidth(self.frame) / 2 + 10, 0, CGRectGetWidth(self.frame) / 2 - 10, CGRectGetHeight(self.frame) / 3)];
    _titleLabel.text = @"Taste新奇体验馆";
    _titleLabel.font = [UIFont systemFontOfSize:14];
    [self.contentView addSubview:_titleLabel];
    
    _upDateLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetWidth(self.frame) / 2 + 10, CGRectGetHeight(self.frame) / 3, CGRectGetWidth(self.frame) / 2 - 10, CGRectGetHeight(self.frame) / 3)];
    _upDateLabel.text = @"更新至第三期";
    _upDateLabel.font = [UIFont systemFontOfSize:10];
    _upDateLabel.textColor = [UIColor lightGrayColor];
    [self.contentView addSubview:_upDateLabel];
    
    _userNameLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetWidth(self.frame) / 2 + 10, CGRectGetHeight(self.frame) * 2 / 3, CGRectGetWidth(self.frame) / 2 - 10, CGRectGetHeight(self.frame) / 3)];
    _userNameLabel.text = @"W-unique";
    _userNameLabel.font = [UIFont systemFontOfSize:10];
    _userNameLabel.textColor = [UIColor lightGrayColor];
    [self.contentView addSubview:_userNameLabel];
    
    
    
    
}
    

@end
